import React, { useState } from 'react';
import { Modal, Button } from 'antd';
import './close.less';
function Close(){
const [isModalVisible, setIsModalVisible] = useState(false);

  const showModal = () => {
    setIsModalVisible(true);
  };

  const handleOk = () => {
    setIsModalVisible(false);
  };

  const handleCancel = () => {
    setIsModalVisible(false);
  };
return(
    <div className='zclose'>
          <a onClick={showModal}>关闭订单</a>
          <div className='zmodal'>
        <Modal
         title="提示" 
        visible={isModalVisible} 
        onCancel={handleCancel} 
        footer={[
                <Button onClick={handleOk} id='btn1'>确认</Button>,
                <Button onClick={handleCancel} id='btn2'>取消</Button>
                ]}>
            <b>您确认关闭该订单么？</b>
            <p>关闭后该订单的状态将变成为交易关闭</p>
        </Modal>
    </div>
    </div>
)
}
export default Close